home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Overload Trio 2
/
Shareware Overload Trio Volume 2 (Chestnut CD-ROM).ISO
/
dir40
/
pc37042.zip
/
CBL
/
TESTSQA.ALC
< prev
next >
Wrap
Text File
|
1987-11-20
|
2KB
|
44 lines
TITLE 'TEST SYSTEM QUEUE AREA MEMORY ALLOCATION'
* PGM-ID. TESTSQA.ALC
* AUTHOR. DON HIGGINS.
* DATE. 11/20/87.
* REMARKS.
* THIS PROGRAM MUST BE LINKED USING L370 OPTION B AND
* MUST THEN BE CALLED FROM MICRO FOCUS COBOL PROGRAM WITH
* THE FOLLOWING FULL WORD BINARY ARGUMENTS:
*
* 01 ADDR-MEMORY PIC 9(6) USAGE COMP.
* 01 LENGTH-MEMORY PIC 9(6) USAGE COMP.
*
* CALL "TESTSQA" USING ADDR-MEMORY LENGTH-MEMORY.
*
* AT ENTRY TO TEST370 THE 370 REGISTERS ARE SET AS FOLLOWS:
*
* R1 = ADDRESS OF ADDRESS LIST WITH HIGH BIT SET IN LAST
* WORD OF LIST.
*
* R13 = STANDARD SAVE AREA
* R14 = RETURN ADDRESS
* R15 = ENTRY ADDRESS
*
* IF SQA MEMORY IS AVAILABLE IN THE RESIDENT EMULATOR REGION,
* THE ADDRESS OF THE NEXT FREE BLOCK WILL BE RETURNED IN THE
* FIRST ARGUMENT AND THE LENGTH WILL BE RETURNED IN THE SECOND.
* THE SECOND ARGUMENT MUST BE SET TO REQUESTED LENGTH BEFORE
* CALL. A SHORT BLOCK WILL BE RETURNED IF REQUESTED LENGTH
* IS NOT AVAILABLE.
*
*
TESTSQA CSECT NAME CONTROL SECTION
USING *,R15 DEFINE BASE REGISER
LM R3,R4,0(R1) LOAD ADDRESS LIST PASSED FROM CALLSQA.CBL
L R1,0(R4) LOAD REQUESTED SQA BLOCK LENGTH IN R1
SVC GMAIN ALLOCATE SQA BLOCK (R0=RC,R1=LENGTH,R2=ADDRESS)
ST R1,0(R4) STORE LENGTH IN LENGTH-MEMORY
ST R2,0(R3) STORE ADDRESS IN ADDR-MEMORY
LR R15,R0 SET RETURN CODE
BR R14 EXIT VIA RETURN ADDRESS TO DETACH AND CALLSQA
COPY CPY\EQUREGS COPY STANDARD R0-R15 REGISTER EQUATES
COPY CPY\EQUSVCS COPY ALL PC/370 SVC NUMBER EQUATES
END